 <#import "../macro/macro.ftl" as m>
 <@m.headContent />
 	<#--用户页面样式文件的引入-->
	 <script type="text/javascript">
	 	$(function() {
			<#--主业务操作-->
			var resourceJs =new $.ToolBarButtonListen({
				item:"resource",
				gridUrl:'${res_path}/listData/page',
				treeId:'resourceTree',
				treeUrl:'${res_path}/listTree',
				treeFeildId:'parentId',
				treeFeildName:'parentName'
			});
			resourceJs.init();
			resourceJs.treeData();
			resourceJs.gridData();
			
			<#--回收站操作-->
			var resourceRecyJs =new $.ToolBarRecycle({
				item:"resource"
			});
			resourceRecyJs.init();

			 <#--树上面三个按钮点击事件-->		 
			 $('#tree_refresh_id').click(function(){
			 	$("#resourceTree").tree('reload');
			 })
			 $('#tree_expand_id').click(function(){
			 	$("#resourceTree").tree('expandAll');
			 })
			 $('#tree_collapse_id').click(function(){
			 	$("#resourceTree").tree('collapseAll');
			 })
		});
	 </script>
 	<div  class="easyui-layout" data-options="fit:true">
 		<div data-options="region:'west',split:true"  style="width:300px;">
 			<div  class="easyui-layout" data-options="fit:true">
 				 <div data-options="region:'north'"  style="height:35px">
 				 	<@m.toolGenelBtn id="tree_refresh_id" title="刷新" icon="arrow_refresh"/>
 				 	<@m.toolGenelBtn id="tree_expand_id" title="展开" icon="book_open"/>
 				 	<@m.toolGenelBtn id="tree_collapse_id" title="收起" icon="book"/>
 				 </div>
 				 <div data-options="region:'center'">
 				 	<ul id="resourceTree"></ul>
 				 </div>
 			</div>
 		</div>
 		<div data-options="region:'center'">
 			<@m.DataGride tableId="resource"  columns=resourcecolumns/>
			<@m.divBegin id="resource"/>
				<@m.toolBtn btn=RESOURCE_ADD opert="add"/>
			 	 <@m.toolBtn btn=RESOURCE_EDIT opert="edit"/>
			 	 <@m.toolBtn btn=RESOURCE_DEL opert="del"/>
				<@m.buttonSeparator/>
				<@m.toolRefreshBtn/>
				<@m.toolBtn btn=RESOURCE_TRASH opert="trash" resId="resId"/>
			<@m.divEnd/>
 		</div>
 	</div>
    
      <#--增加页面-->
    <@m.window wid="resource" icons="save"  style="width:700px;height:540px;padding:10px;"/>
	<#--回收站业务-->
	 <@m.myWin id="recycleId" style="width:700px;height:640px;padding:0px;" icon="trash" title="回收站"/>
	
	<@m.searchHidden name="parentId" sqlsep="EQ" value="ROOT"/>
	<@m.hiddenInput name="parentName"  value="根菜单"/>